package com.xy.lang.enums;

import com.xy.lang.domain.KeyValue;

public enum AuditStatusEnum implements CodeEnum {

    UNDO(0, "待审核"),
    PASS(1, "审核通过"),
    FAIL(2, "审核不通过"),
    DOING(3, "审核中");

    private int code;
    private String name;

    AuditStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public KeyValue<Integer, String> toKeyValue() {
        return new KeyValue<>(this.code, this.name);
    }

}
